{include file="common/Header.html"}
<body class="body-main">
<ul id="admin_sub_title">
	<li class="unsub"><a href="{'Admin/flink/index'|url}">链接管理</a></li>
	<li class="sub">{if $id==0}添加{else}编辑{/if}链接</li>
</ul>

<div id="admin_right_b">
  <form method="post">
    <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" id="tagContent0">
	<tr>
      <td width="120" align="right" class="tdbg">链接名称：</td>
      <td class="tdbg"><input name="con[title]" type="text" value="{$title}" class="input" size="30"></td>
    </tr>
	<tr>
      <td align="right" class="tdbg">标题样式：</td>
      <td class="tdbg"><select name="con[style1]">
				<option value="" >默认</option>
				<option value="color:#CC0000;" style="color:#CC0000;"{if stripos($style,'color:#CC0000;')>-1} selected{/if}>红色</option>
				<option value="color:#0000FF;" style="color:#0000FF;"{if stripos($style,'color:#0000FF;')>-1} selected{/if}>蓝色</option>
				<option value="color:#009900;" style="color:#009900;"{if stripos($style,'color:#009900;')>-1} selected{/if}>绿色</option>
				<option value="color:#996600;" style="color:#996600;"{if stripos($style,'color:#996600;')>-1} selected{/if}>咖啡色</option>
				<option value="color:#8142BF;" style="color:#8142BF;"{if stripos($style,'color:#8142BF;')>-1} selected{/if}>紫色</option>
				<option value="color:#FF6600;" style="color:#FF6600;"{if stripos($style,'color:#FF6600;')>-1} selected{/if}>橘黄色</option>
			</select>
			<select name="con[style2]">
				<option value="" >默认</option>
				<option value="font-weight:bold;"{if stripos($style,'font-weight:bold;')>-1} selected{/if}>加粗</option>
				<option value="text-decoration:underline;"{if stripos($style,'text-decoration:underline;')>-1} selected{/if}>下划线</option>
			</select>
	  </td>
    </tr>
	<tr>
      <td width="120" align="right" class="tdbg">链接地址：</td>
      <td class="tdbg"><input name="con[url]" type="text" value="{$url|default:'http://'}" class="input" size="50"></td>
    </tr>

	<tr>
      <td width="120" align="right" class="tdbg">排序：</td>
      <td class="tdbg"><input name="con[order]" type="text" value="{$order|default:0}" class="input" size="30"> (数字越大越前面)</td>
    </tr>

	<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" >
		<tr class="tdbg">
		  <td width="100">&nbsp;</td>
		  <td><div class="aui_buttons"  style="text-align:left;"><button type="submit" id="dosave" class="aui_state_highlight">保存</button><button type="reset" class="aui_state_highlight">重置</button><button type="button" onClick="history.go(-1)" class="aui_state_highlight">返回</button></div></td>
		</tr>
	</table>
 </form>
<script type="text/javascript">
$("#dosave").click(function(){
		showDialog();
		$.ajax({
			type:"post",
			url:"?Admin-flink-update-id-{$id|default:0}",
			data:$("form").serialize(),
			dataType:'json',
			timeout:28000,
			global:false,
			success:function(data){
				if(data.status==1){
					showAlert('success','恭喜你，修改成功','?Admin-flink-index');
				}else{
					showAlert('error',data.info);
				}
			}
		});
	 return false;
	});
</script>
<div class="runtime"></div>  
</div>
</body>
</html>